<!DOCTYPE html>
<html lang="en">
<head>
   <include file="Public:header" />
    <title></title>
</head>
<body class="eee">
	  <include file="Public:head" />
	  <form action="<{:U('User/act_blance')}>">
    <div class="mb50 mt50 header-dd">
    	<div class="fff hui-xq-shu">
            	<ul>
            		<li style="line-height:20px; padding:5px; color:#999999">
            			<!--<span style="display:block; line-height:14px; overflow:hidden;  width:80px"><{$placeData.name}></span>-->
            			<{$placeData.name}><{$placeData.address}>
            		</li>
            		<volist name="part_info" id="vo">
					<li>
					<input type="hidden" name="order[<{$vo.id}>][<{$vo.starttime}>][part_id]" value="<{$vo.id}>">
					<input type="hidden" name="order[<{$vo.id}>][<{$vo.starttime}>][starttime]" value="<{$vo.starttime}>">
					<input type="hidden" name="order[<{$vo.id}>][<{$vo.starttime}>][endtime]" value="<{$vo.endtime}>">
					<input type="hidden" name="order_sn" value="<{$order_sn}>">
					<input type="hidden" name="type" value="<{$type}>">
					<input type="hidden" name="day" value="<{$day}>">
					<input type="hidden" name="store_id" value="<{$store_id}>">
					<input type="hidden" name="payment_id" value="41">
            			<span><{$vo.name}></span>
            			<p><{$vo.starttime}>:00-<{$vo.endtime}>:00&nbsp; ￥<{$vo.goods_amount}><!--(<{$vo.status.text}>)--></p>
            		</li>
            		</volist> 
            		<li>
            			<span>日期</span>
            			<p><{$N}>（<{$day}>）</p>
            		</li>
            	</ul>
            </div>
            <div class="header-dd1">
            	<span>总计(<{$type_title}>)</span>
            	<i>￥<font id="order_amount"><{$order_amount}></font><input type="hidden" id="card_num" value="<{$card_num}>"></i>
            </div>
			

			<!--支付方式开始-->
		  <div class="py-cj4" style="background-color:#FFFFFF; margin-top:20px;">
    			<dl id="payment">
    				<dt>支付方式</dt>
    				<if condition="$type eq 1">
					<dd><i class="xuanz py-cj17 cur" data-dx="50"><em></em></i><a href="javascript:;"><span>卡支付（<{$user_info['num']}>次）</span></a></dd>
					</if>
					<dd><i class="xuanz py-cj17" data-dx="49"><em></em></i><a href="javascript:;"><span>余额支付(<{$user_info['money']}>元)</span></a></dd>
    				<dd><i class="xuanz py-cj17" data-dx="44"><em></em></i><a href="javascript:;"><span>微信支付</span></a></dd>
    			</dl>
    			 
    		</div>
			<!--支付方式结束-->
            <!--<p class="header-dd2">您的手机号是：<input type="hidden" name="tel" value="<{$user_info['phone']}>"><{$user_info['phone']}></p>-->

            <div style="padding: 0 10px;">
			   <if condition="$type eq 3  && ($order_sn)">
            	<input type="submit" onClick="return SubmitOrder()"   value="接受邀请" class="header-an ff850d" />
			  <elseif condition="($type eq 3)"/>
            	<input type="submit" onClick="return SubmitOrder()"   value="邀请好友" class="header-an ff850d" />
				 <elseif condition="$type eq 2 && ($order_sn)"/>
            	<input type="submit" onClick="return SubmitOrder()"   value="完成匹配" class="header-an ff850d" />
			   <elseif condition="$type eq 2"/>
            	<input type="submit" onClick="return SubmitOrder()"   value="提交匹配" class="header-an ff850d" />
				<else />
				<input type="submit" onClick="return SubmitOrder()"   value="提交订单" class="header-an ff850d" />
				</if>
              <!--  <input type="submit" value="等待匹配 等待邀请" class="header-an cfcece" />-->
            </div>
            <p class="header-dd2 header-dd3">不支持退款</p>
            <input type="hidden" value="" id="payment_id" name="payment_id">
            
    </div>
	</form>
	<script type="text/javascript">
	  $("#payment dd").click(function(){
	    $("#payment dd i").removeClass("cur");
	    $(this).find("i").addClass("cur");
	  })
	  function SubmitOrder(){
	    var l=$("#payment dd .cur").length;
		var order_amount=Number($("#order_amount").text());
		if(Number(l)>0){
		  var payment_id=$("#payment dd .cur").attr("data-dx");
		}else{
			 dialog("请选择支付方式");
			 return false;
		}
			$("#payment_id").val(payment_id);
		/*******如果使用卡支付**/
		if(payment_id==50){
		   if(<{$user_info['num']}> < <{$card_num}>){
		     dialog("订单需要使用<{$hour}>次卡，剩余卡次数不足");
			 return false;
		   }
		}
	  /***********使用余额支付********/	
	  if(payment_id==49){
		   if(<{$user_info['money']}> < order_amount){
		     dialog("余额不足，请先充值或使用微信支付");
			 return false;
		   }
		}
		/************确认提前订单吗*****/	
		if(!confirm("确认提交订单吗？")){
		   return false;
		}
	  }
	</script>
 <include file="Public:footer" />
</body>
</html>